import os
import sys
import tkinter as tk
import tkinter.ttk as ttk
from 运维工具.登录.登录页 import Login
from 运维工具.登录.验证页 import Check
from 运维工具.登录逻辑 import 调用入口

if __name__ == '__main__':
    # 打开登录逻辑


    #登录页面
    login_page = tk.Tk()
    login_state = tk.BooleanVar(login_page, value=False)
    app = Login(master=login_page, width=400, height=350, title='运维工具 v0.0.1', login_state=login_state)


    login_page.mainloop()
    print(f"登录状态: {login_state.get()}")

    # 验证页面
    check_login_page = tk.Tk()

    check = Check(master=check_login_page, title='运维工具 v0.0.1', width=400, height=300, )
    if login_state.get():
        check_login_page.mainloop()
    # 窗口关闭后，打印登录状态